home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Freeware 2001 May
/
SGI Freeware 2001 May - Disc 1.iso
/
dist
/
fw_socks5.idb
/
usr
/
freeware
/
src
/
socks5
/
patches.z
/
patches
Wrap
Text File
|
1999-04-16
|
10KB
|
318 lines
*** ./lib/Makefile.in Tue Aug 26 17:21:55 1997
--- ../socks5-v1.0r5/./lib/Makefile.in Sat Jan 16 22:12:12 1999
***************
*** 10,16 ****
BINRM = @BINRM@
INSTALL = @INSTALL@
RANLIB = @RANLIB@
! AR = ar rv
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
DLLIBS = @DLLIBS@
--- 10,16 ----
BINRM = @BINRM@
INSTALL = @INSTALL@
RANLIB = @RANLIB@
! AR = ar crv
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
DLLIBS = @DLLIBS@
*** ./lib/wrap.c Thu Feb 19 13:49:58 1998
--- ../socks5-v1.0r5/./lib/wrap.c Sun Jan 17 21:54:25 1999
***************
*** 63,69 ****
}
/* wrapper around the connect system call. */
! int LIBPREFIX(connect)(S5IOHandle sd, CONST ss *name, int namelen) {
int rval;
#ifdef FOR_SHARED_LIBRARY
--- 63,69 ----
}
/* wrapper around the connect system call. */
! int LIBPREFIX(connect)(S5IOHandle sd, CONST /* ss */ void *name, int namelen) {
int rval;
#ifdef FOR_SHARED_LIBRARY
***************
*** 87,93 ****
}
/* wrapper around the bind system call. */
! int LIBPREFIX(bind)(S5IOHandle sd, CONST ss *name, int namelen) {
int rval;
#ifdef FOR_SHARED_LIBRARY
--- 87,93 ----
}
/* wrapper around the bind system call. */
! int LIBPREFIX(bind)(S5IOHandle sd, CONST /* ss */ void *name, int namelen) {
int rval;
#ifdef FOR_SHARED_LIBRARY
***************
*** 111,117 ****
}
/* wrapper around the getsockname system call. */
! int LIBPREFIX(getsockname)(S5IOHandle sd, struct sockaddr *name, int *namelen) {
int rval;
#ifdef FOR_SHARED_LIBRARY
--- 111,117 ----
}
/* wrapper around the getsockname system call. */
! int LIBPREFIX(getsockname)(S5IOHandle sd, /* struct sockaddr */ void *name, int *namelen) {
int rval;
#ifdef FOR_SHARED_LIBRARY
***************
*** 136,142 ****
}
/* wrapper around the getpeername system call. */
! int LIBPREFIX(getpeername)(S5IOHandle sd, struct sockaddr *name, int *namelen) {
int rval;
#ifdef FOR_SHARED_LIBRARY
--- 136,142 ----
}
/* wrapper around the getpeername system call. */
! int LIBPREFIX(getpeername)(S5IOHandle sd, /* struct sockaddr */ void *name, int *namelen) {
int rval;
#ifdef FOR_SHARED_LIBRARY
***************
*** 161,167 ****
}
/* wrapper around the send system call. */
! IORETTYPE LIBPREFIX(send)(S5IOHandle sd, const IOPTRTYPE msg, IOLENTYPE len, int flags) {
int rval;
#ifdef FOR_SHARED_LIBRARY
--- 161,167 ----
}
/* wrapper around the send system call. */
! IORETTYPE LIBPREFIX(send)(S5IOHandle sd, const IOPTRTYPE msg, /* IOLENTYPE */ int len, int flags) {
int rval;
#ifdef FOR_SHARED_LIBRARY
***************
*** 185,191 ****
}
/* wrapper around the sendto system call. */
! IORETTYPE LIBPREFIX(sendto)(S5IOHandle sd, const IOPTRTYPE msg, IOLENTYPE len, int flags, struct sockaddr *to, int tolen) {
int rval;
#ifdef FOR_SHARED_LIBRARY
--- 185,191 ----
}
/* wrapper around the sendto system call. */
! IORETTYPE LIBPREFIX(sendto)(S5IOHandle sd, const IOPTRTYPE msg, /* IOLENTYPE */ int len, int flags, /* struct sockaddr */ const void *to, int tolen) {
int rval;
#ifdef FOR_SHARED_LIBRARY
***************
*** 209,215 ****
}
/* wrapper around the recv system call. */
! IORETTYPE LIBPREFIX(recv)(S5IOHandle sd, IOPTRTYPE msg, IOLENTYPE len, int flags) {
int rval;
#ifdef FOR_SHARED_LIBRARY
--- 209,215 ----
}
/* wrapper around the recv system call. */
! IORETTYPE LIBPREFIX(recv)(S5IOHandle sd, IOPTRTYPE msg, /* IOLENTYPE */ int len, int flags) {
int rval;
#ifdef FOR_SHARED_LIBRARY
***************
*** 233,239 ****
}
/* wrapper around the recvfrom system call. */
! IORETTYPE LIBPREFIX(recvfrom)(S5IOHandle sd, IOPTRTYPE msg, IOLENTYPE len, int flags, ss *from, int *fromlen) {
int rval;
#ifdef FOR_SHARED_LIBRARY
--- 233,239 ----
}
/* wrapper around the recvfrom system call. */
! IORETTYPE LIBPREFIX(recvfrom)(S5IOHandle sd, IOPTRTYPE msg, /* IOLENTYPE */ int len, int flags, /* ss */ void *from, int *fromlen) {
int rval;
#ifdef FOR_SHARED_LIBRARY
***************
*** 492,497 ****
--- 492,505 ----
#endif
REAL(longjmp)(env, val);
+ }
+
+ int LIBPREFIX(BSDlongjmp)(jmp_buf env, int val) {
+ #ifdef FOR_SHARED_LIBRARY
+ lsInWrapFunction = 0;
+ #endif
+
+ return REAL(BSDlongjmp)(env, val);
}
#ifndef FOR_SHARED_LIBRARY
*** ./lib/rld.c Thu Feb 19 13:49:57 1998
--- ../socks5-v1.0r5/./lib/rld.c Sun Jan 17 21:57:19 1999
***************
*** 270,275 ****
--- 270,285 ----
((void (*)(jmp_buf, int))func)(env, val);
}
+ int REAL(BSDlongjmp) (jmp_buf env, int val) {
+ static void *func = NULL;
+
+ GetOriginalFunc(&func, "_BSDlongjmp", TRY_LIBC);
+ if (!func || func == (void *)-1) return;
+
+ lsInRLDFunctions = 0;
+ return ((int (*)(jmp_buf, int))func)(env, val);
+ }
+
int REAL(select) (S5IOHandle wd, fd_set *rs, fd_set *ws, fd_set *es, struct timeval *to) {
GETFUNC("_select", TRY_LIBC, -1, (int (*)P((S5IOHandle, fd_set *, fd_set *, fd_set *, struct timeval *))), (wd, rs, ws, es, to), int);
}
*** ./lib/wrap_tcp.c Thu Feb 19 13:49:58 1998
--- ../socks5-v1.0r5/./lib/wrap_tcp.c Sat Jan 16 21:56:38 1999
***************
*** 455,461 ****
/* with the server (recv a message), and then dup the file descriptor (***) */
/* because clients usually close the acceptingfd and leave open the */
/* accepted one. Once we've done that, we add the connection, and return. */
! S5IOHandle LIBPREFIX(accept)(S5IOHandle sd, ss *name, int *namelen) {
extern S5IOHandle LIBPREFIX(dup) P((S5IOHandle));
S5IOHandle fd = S5InvalidIOHandle;
lsSocksInfo *pcon, *ncon;
--- 455,461 ----
/* with the server (recv a message), and then dup the file descriptor (***) */
/* because clients usually close the acceptingfd and leave open the */
/* accepted one. Once we've done that, we add the connection, and return. */
! S5IOHandle LIBPREFIX(accept)(S5IOHandle sd, /* ss */ void *name, int *namelen) {
extern S5IOHandle LIBPREFIX(dup) P((S5IOHandle));
S5IOHandle fd = S5InvalidIOHandle;
lsSocksInfo *pcon, *ncon;
*** ./include/socks.h Thu Feb 19 13:49:54 1998
--- ../socks5-v1.0r5/./include/socks.h Sun Jan 17 22:01:44 1999
***************
*** 43,48 ****
--- 43,49 ----
extern int LIBPREFIX(fclose) P((FILE *));
extern struct tm * LIBPREFIX(localtime) P((const time_t *));
extern void LIBPREFIX(longjmp) P((jmp_buf, int));
+ extern int LIBPREFIX(BSDlongjmp) P((jmp_buf, int));
extern int LIBPREFIX(select) P((int, fd_set *, fd_set *, fd_set *, struct timeval *));
extern struct hostent *LIBPREFIX(gethostbyname) P((char *));
***************
*** 94,100 ****
--- 95,108 ----
#define shutdown LIBPREFIX(shutdown)
#define fclose LIBPREFIX(fclose)
#define localtime LIBPREFIX(localtime)
+
+ #if defined(sgi) && (defined(_BSD_SIGNALS) || defined(_BSD_COMPAT))
+ #undef longjmp
+ #define longjmp LIBPREFIX(BSDlongjmp)
+ #else
#define longjmp LIBPREFIX(longjmp)
+ #endif
+
#define close LIBPREFIX(close)
#define dup2 LIBPREFIX(dup2)
#define dup LIBPREFIX(dup)
*** ./include/socks5p.h Thu Feb 19 13:49:54 1998
--- ../socks5-v1.0r5/./include/socks5p.h Sat Jan 16 21:56:38 1999
***************
*** 16,22 ****
#include "config.h"
#include "hide.h"
#include "includes.h"
! #include "hide.h"
#include "defs.h"
#include "socks5api.h"
#include "system.h"
--- 16,22 ----
#include "config.h"
#include "hide.h"
#include "includes.h"
! #include "unhide.h"
#include "defs.h"
#include "socks5api.h"
#include "system.h"
*** ./include/system.h Thu Feb 19 13:49:54 1998
--- ../socks5-v1.0r5/./include/system.h Sun Jan 17 22:02:11 1999
***************
*** 48,53 ****
--- 48,54 ----
struct tm * REAL(localtime) P((const time_t *));
void REAL(longjmp) P((jmp_buf, int));
+ int REAL(BSDlongjmp) P((jmp_buf, int));
int REAL(fclose) P((FILE *));
int REAL(close) P((S5IOHandle));
int REAL(shutdown) P((S5IOHandle, int));
*** ./include/hide.h Thu Feb 19 13:49:54 1998
--- ../socks5-v1.0r5/./include/hide.h Sun Jan 17 22:00:16 1999
***************
*** 34,39 ****
--- 34,40 ----
#define shutdown HIDE(shutdown)
#define listen HIDE(listen)
#define longjmp HIDE(longjmp)
+ #define BSDlongjmp HIDE(BSDlongjmp)
#define close HIDE(close)
#define flcose HIDE(fclose)
***************
*** 62,67 ****
--- 63,69 ----
#undef shutdown
#undef listen
#undef longjmp
+ #undef BSDlongjmp
#undef close
#undef flcose
*** ./server/flow.c Thu Feb 19 13:49:59 1998
--- ../socks5-v1.0r5/./server/flow.c Sat Jan 16 21:56:38 1999
***************
*** 68,74 ****
}
for (fds = bu ; ; fds = bu) {
! struct timeval tout = { idletimeout*60, 0 };
if (!FD_ISSET(iio->fd, &fds) && !FD_ISSET(oio->fd, &fds)) {
S5LogUpdate(S5LogDefaultHandle, S5_LOG_WARNING, 0, "Flow Recv: Neither file descriptor is set");
--- 68,76 ----
}
for (fds = bu ; ; fds = bu) {
! struct timeval tout;
! tout.tv_sec = idletimeout*60;
! tout.tv_usec = 0;
if (!FD_ISSET(iio->fd, &fds) && !FD_ISSET(oio->fd, &fds)) {
S5LogUpdate(S5LogDefaultHandle, S5_LOG_WARNING, 0, "Flow Recv: Neither file descriptor is set");